package top.lfyao.designpattern.details.factory.simple;

/**
 * 除法类division
 */
public class OperationDivision extends Operation{
    @Override
    public double result() {
        if (numberB==0) throw new RuntimeException("divided by 0");
        return numberA / numberB;
    }
}
